<?php
/**
 * 会员中心管理
 * @author cjli
 *
 */ 
class ShopAction extends HomeAction
{

	public function _initialize()
	{
		parent::_initialize();
	} 
	public function offline(){
		global $user, $language_id;

		$this->display('offline');
	}
	public function offlineAdd(){
		global $user, $language_id;
		$post =$_POST;
		if(empty($post['customerName']) || empty($post['email']) || empty($post['phone'])){
			$this->error(L('_fill_must_'));				
		}
		if(!empty($post['dosubmit'])){
			$russia_db = D('online_shop');
			$set = array(
				'name'=>trim($post['customerName']),
				'email'=>trim($post['email']),
				'phone'=>trim($post['phone']),
				'reg_time' => time(),
				'language_id'=>$language_id,
			);
			$russiaInfo =$russia_db->add($set);
			if(!$russiaInfo){
				$this->error(L('_REGISTRATION_FAILED_'));
			}else{
				$this->success(L('add successful'),'/shop/offline');
			}
		}
	}
}